package com.livegoods.pojo;

import lombok.Data;

import java.util.List;

@Data
public class LivegoodsResult {

    private Integer status;//返回状态提示码 200,500错误

    private String msg;//提示消息

    private Object results;

    private Object data;

    private boolean hasMore;


    public static LivegoodsResult ok(){
        LivegoodsResult result = new LivegoodsResult();
        result.setStatus(200);
        result.setMsg("ok");
        return result;
    }

    public static LivegoodsResult ok(List data){
        LivegoodsResult result = new LivegoodsResult();
        result.setStatus(200);
        result.setMsg("ok");
        result.setData(data);
        return result;
    }

    public static LivegoodsResult error(String msg){
        LivegoodsResult result = new LivegoodsResult();
        result.setStatus(500);
        result.setMsg(msg);
        return result;
    }

}
